<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateYsUserfansTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('userfans', function(Blueprint $table)
		{
			$table->increments('id')->comment('主键id');
			$table->bigInteger('uid')->comment('用户id关联用户id');
			$table->bigInteger('fans_id')->comment('粉丝id关联用户id');
			$table->tinyInteger('status')->nullable()->default(0)->comment('状态0为关注,1为取消关注,2为互相关注');
			$table->tinyInteger('like')->nullable()->default(0)->comment('用户是否希望作者开通吧1为希望');
			$table->integer('follow_time')->nullable()->comment('关注时间');
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('userfans');
	}

}
